﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Share;
using Newtonsoft.Json;

namespace NewtonJsonUsage
{
    public static class DeserializeObject
    {
        public static void Demo() {
            Console.WriteLine("反序列化");
            string json ="{'Name':'Apple','ExpiryDate':'2008-12-28T00:00:00','Price':3.99,'Sizes':['Small','Medium','Large']}";

            Product p = JsonConvert.DeserializeObject<Product>(json);

            Console.WriteLine(p.Name);
            
        }
    }
}
